<script>

	function posting_jurnal2(){
		$.ajax({
				type: 'POST',
				url: "<?=base_url().'index.php/penerimaan_kas/posting_penerimaan_kas/'?>",
				data: $('#posting_penerimaan_kas').serialize(),
				success: function(data) {
					$.fancybox.close();
					window.location.href="<?=base_url().'index.php/penerimaan_kas/insert/'?>";
				}
			});
			return false;		
	}
	
function batal2(){
		 
					$.fancybox.close();
					 
	  }
</script>

<table border="0" width="100%" cellpadding="0" cellspacing="0" class="display" id="transaction-table">
<thead>
<th>GLID</th>
<th>TANGGAL</th>
<th>AKUNID</th>
<th>NAMA AKUN</th>
<th>DEBET</th>
<th>KREDIT</th>
</thead>
<tbody>
	<?php
		$attributes = array('name' => 'posting_penerimaan_kas', 'id' => 'posting_penerimaan_kas', 'class'=>'block-content form');
		echo form_open('penerimaan_kas/posting_penerimaan_kas', $attributes);
	?>
	<?php for ($i=0;$i<count($akunid);$i++){ ?>
	<tr>
		<td><?=$glid. '<input type="hidden" name="glid" value="' . $glid . '">';?></td>
		<td><?=$tanggal. '<input type="hidden" name="tanggal" value="' . $tanggal . '">';?></td>
		<td><?=$akunid[$i]. '<input type="hidden" name="akunid[]" value="' . $akunid[$i] . '">';?></td>
		<td><?=$nakun[$i]?></td>
		<td><?=$debet[$i]. '<input type="hidden" name="debet[]" value="' . $debet[$i] . '">';?></td>
		<td><?=$kredit[$i]. '<input type="hidden" name="kredit[]" value="' . $kredit[$i] . '">';?></td>
	</tr>
	<?php } ?>
	<tr>
		<td colspan="4">
		<td><?=$jumlah_pemasukan. '<input type="hidden" name="jumlah_pemasukan" value="' . $jumlah_pemasukan . '">';?></td>
		<td><?=$jumlah_pengeluaran. '<input type="hidden" name="jumlah_pengeluaran" value="' . $jumlah_pengeluaran . '">';?></td>
	</tr>
	<tr>
		<td><input type="submit" value="Simpan" class="form-submit"></td>
		<td><input type="reset"  onclick="batal2()" value="Batal" class="form-reset"></td>
		<td colspan="4"></td>
	</tr>
	</form>
</tbody>

</table>


